import java.io.*;
import org.antlr.runtime.*;
import machine.Sam;

public class Procesador {
	public static void main(String args[]) throws Exception{
		try {	
			AnalexSAM analex = new AnalexSAM(new ANTLRFileStream(args[0]));
			AnasintSAM anasint = new AnasintSAM(new CommonTokenStream(analex));

			Sam sam = new Sam(anasint.code());
			sam.compile();			
		} catch(FileNotFoundException fnfe) {
			System.err.println("No existe el fichero");
		}
	}
}
